﻿Imports System
Imports System.Reflection

Namespace System.Workflow.ComponentModel
    Friend NotInheritable Class WalkerEventArgs
        Inherits EventArgs
        ' Methods
        Friend Sub New(ByVal currentActivity As Activity)
            Me.currentActivity = currentActivity
            Me.currentPropertyOwner = Nothing
            Me.currentProperty = Nothing
            Me.currentValue = Nothing
        End Sub

        Friend Sub New(ByVal currentActivity As Activity, ByVal currentValue As Object, ByVal currentProperty As PropertyInfo, ByVal currentPropertyOwner As Object)
            Me.New(currentActivity)
            Me.currentPropertyOwner = currentPropertyOwner
            Me.currentProperty = currentProperty
            Me.currentValue = currentValue
        End Sub


        ' Properties
        Public Property Action As WalkerAction
            Get
                Return Me.action
            End Get
            Set(ByVal value As WalkerAction)
                Me.action = value
            End Set
        End Property

        Public ReadOnly Property CurrentActivity As Activity
            Get
                Return Me.currentActivity
            End Get
        End Property

        Public ReadOnly Property CurrentProperty As PropertyInfo
            Get
                Return Me.currentProperty
            End Get
        End Property

        Public ReadOnly Property CurrentPropertyOwner As Object
            Get
                Return Me.currentPropertyOwner
            End Get
        End Property

        Public ReadOnly Property CurrentValue As Object
            Get
                Return Me.currentValue
            End Get
        End Property


        ' Fields
        Private action As WalkerAction
        Private currentActivity As Activity
        Private currentProperty As PropertyInfo
        Private currentPropertyOwner As Object
        Private currentValue As Object
    End Class
End Namespace

